use crate::crypto::crypt_types::CRYPT_EAL_LibCtx;
use crate::bsl::bsl_params::BSL_Param;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Otp_Ctx {
    _unused: [u8; 0],
}
pub type HITLS_AUTH_OtpCtx = Otp_Ctx;
pub const HITLS_AUTH_OTP_HOTP: HITLS_AUTH_OtpType = 1;
pub const HITLS_AUTH_OTP_TOTP: HITLS_AUTH_OtpType = 2;
pub type HITLS_AUTH_OtpType = ::std::os::raw::c_uint;
pub const HITLS_AUTH_OTP_SET_CTX_DIGITS: HITLS_AUTH_OtpCmd = 1;
pub const HITLS_AUTH_OTP_SET_CTX_HASHALGID: HITLS_AUTH_OtpCmd = 2;
pub const HITLS_AUTH_OTP_SET_CTX_TOTP_TIMESTEPSIZE: HITLS_AUTH_OtpCmd = 3;
pub const HITLS_AUTH_OTP_SET_CTX_TOTP_STARTOFFSET: HITLS_AUTH_OtpCmd = 4;
pub const HITLS_AUTH_OTP_SET_CTX_TOTP_VALIDWINDOW: HITLS_AUTH_OtpCmd = 5;
pub const HITLS_AUTH_OTP_GET_CTX_PROTOCOLTYPE: HITLS_AUTH_OtpCmd = 6;
pub const HITLS_AUTH_OTP_GET_CTX_KEY: HITLS_AUTH_OtpCmd = 7;
pub const HITLS_AUTH_OTP_GET_CTX_DIGITS: HITLS_AUTH_OtpCmd = 8;
pub const HITLS_AUTH_OTP_GET_CTX_HASHALGID: HITLS_AUTH_OtpCmd = 9;
pub const HITLS_AUTH_OTP_GET_CTX_TOTP_TIMESTEPSIZE: HITLS_AUTH_OtpCmd = 10;
pub const HITLS_AUTH_OTP_GET_CTX_TOTP_STARTOFFSET: HITLS_AUTH_OtpCmd = 11;
pub const HITLS_AUTH_OTP_GET_CTX_TOTP_VALIDWINDOW: HITLS_AUTH_OtpCmd = 12;
pub type HITLS_AUTH_OtpCmd = ::std::os::raw::c_uint;
pub const HITLS_AUTH_OTP_CRYPTO_SHA1: HITLS_AUTH_OtpCryptAlgId = 47;
pub const HITLS_AUTH_OTP_CRYPTO_SHA256: HITLS_AUTH_OtpCryptAlgId = 49;
pub const HITLS_AUTH_OTP_CRYPTO_SHA512: HITLS_AUTH_OtpCryptAlgId = 51;
pub type HITLS_AUTH_OtpCryptAlgId = ::std::os::raw::c_uint;
pub const HITLS_AUTH_OTP_RANDOM_CB: HITLS_AUTH_OtpCryptCbType = 1;
pub const HITLS_AUTH_OTP_HMAC_CB: HITLS_AUTH_OtpCryptCbType = 2;
pub type HITLS_AUTH_OtpCryptCbType = ::std::os::raw::c_uint;
pub type HITLS_AUTH_OtpHmac = ::std::option::Option<
    unsafe extern "C" fn(
        libCtx: *mut ::std::os::raw::c_void,
        attrName: *const ::std::os::raw::c_char,
        algId: i32,
        key: *const u8,
        keyLen: u32,
        input: *const u8,
        inputLen: u32,
        hmac: *mut u8,
        hmacLen: *mut u32,
    ) -> i32,
>;
pub type HITLS_AUTH_OtpRandom =
    ::std::option::Option<unsafe extern "C" fn(buffer: *mut u8, bufferLen: u32) -> i32>;
unsafe extern "C" {
    pub fn HITLS_AUTH_OtpNewCtx(protocolType: i32) -> *mut HITLS_AUTH_OtpCtx;
}
unsafe extern "C" {
    pub fn HITLS_AUTH_ProviderOtpNewCtx(
        libCtx: *mut CRYPT_EAL_LibCtx,
        protocolType: i32,
        attrName: *const ::std::os::raw::c_char,
    ) -> *mut HITLS_AUTH_OtpCtx;
}
unsafe extern "C" {
    pub fn HITLS_AUTH_OtpFreeCtx(ctx: *mut HITLS_AUTH_OtpCtx);
}
unsafe extern "C" {
    pub fn HITLS_AUTH_OtpSetCryptCb(
        ctx: *mut HITLS_AUTH_OtpCtx,
        cbType: i32,
        cryptCb: *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_AUTH_OtpInit(ctx: *mut HITLS_AUTH_OtpCtx, key: *mut u8, keyLen: u32) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_AUTH_OtpGen(
        ctx: *mut HITLS_AUTH_OtpCtx,
        param: *const BSL_Param,
        otp: *mut ::std::os::raw::c_char,
        otpLen: *mut u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_AUTH_OtpValidate(
        ctx: *mut HITLS_AUTH_OtpCtx,
        param: *const BSL_Param,
        otp: *const ::std::os::raw::c_char,
        otpLen: u32,
        matched: *mut u64,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_AUTH_OtpCtxCtrl(
        ctx: *mut HITLS_AUTH_OtpCtx,
        cmd: i32,
        param: *mut ::std::os::raw::c_void,
        paramLen: u32,
    ) -> i32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_data {
    pub _address: u8,
}
